package o;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.net.Uri;
import android.provider.MediaStore.Files;
import android.provider.MediaStore.Images.Media;
import java.io.File;

public class bcc {
    public static boolean ˏ(ContentResolver contentResolver, File file) {
        if (!file.exists()) {
            return true;
        }
        if (file.isDirectory()) {
            String[] list = file.list();
            if (list != null && list.length > 0) {
                return false;
            }
        }
        Uri contentUri = Files.getContentUri("external");
        String str = "_data=?";
        String[] strArr = new String[]{file.getAbsolutePath()};
        contentResolver.delete(contentUri, str, strArr);
        if (file.exists()) {
            ContentValues contentValues = new ContentValues();
            contentValues.put("_data", r4);
            contentResolver.insert(Media.EXTERNAL_CONTENT_URI, contentValues);
            contentResolver.delete(contentUri, str, strArr);
        }
        return file.exists();
    }
}
